package com.marktotop.dao.impl;

import com.marktotop.dao.BookDao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author WXLD
 * @data 2021/4/18 - 21:50
 */
@Component("bookDao")
@PropertySource("classpath:application.properties")
public class BookDaoImpl implements BookDao {

    /* 注入properties中的属性值 */
    @Value("${jdbc.username}")
    private String username;

    @Value("${jdbc.password}")
    private String password;


    @Override
    public void save() {
        System.out.println("Book Dao Running....."+username+" "+password);
    }
}
